<jsp:directive.page import="java.util.Date"/>
<%@ include file="/other/Header.jsp"%>
<%@ include file="/other/Date.jsp" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="java.sql.*"/>
<jsp:directive.page import="Connectivity.ConnectionManager"/>
 <%
 //Connection con=null;
String status = request.getParameter("status")!=null?request.getParameter("status"):"null";
String image_name = request.getParameter("image_name")!=null?request.getParameter("image_name"):"spacer.gif";
String path1 = "/container/images/";
String basePath1 = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path1+"/";
  Date d1=new Date();
String current_date=(d1.getDate()+"-"+(d1.getMonth()+1)+"-"+(d1.getYear()+1900));  
String current_year=""+(d1.getYear()+1900);

 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'ServiceCall.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
    <script language="javaScript" type="text/javascript" src="/other/data.js"></script>
    </head>
  <script>
  
  function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
            return false;

         return true;
      }
  

function startCalc(){
  interval = setInterval("calc()",1);
}
function calc(){
  ta = document.serviceform.ta.value;
  fe = document.serviceform.fe.value;
  lodge = document.serviceform.lodge.value;
  other = document.serviceform.other.value;
   
  document.serviceform.total.value = (ta * 1) + (fe * 1) + (lodge * 1) + (other * 1);
}
function stopCalc(){
  clearInterval(interval);
}

 function chksel(obj)
  {
   if(document.serviceform.pfp1.checked)
   {document.getElementById("pfp").style.display="block";}
   else
   {document.getElementById("pfp").style.display="none";}   	
   	
    if(document.serviceform.mtaken1.checked)
    {document.getElementById("mtaken").style.display="block"; }
    else
   {document.getElementById("mtaken").style.display="none";}   	
   
    if(document.serviceform.mgiven1.checked)
    {document.getElementById("mgiven").style.display="block";}
    else
   {document.getElementById("mgiven").style.display="none";}   	
    
  } 
 
  function hiderow()
  {
  document.getElementById("mtaken").style.display="none";
  document.getElementById("mgiven").style.display="none";
  document.getElementById("pfp").style.display="none";
  }
  
//  history.forward(1); 
  </script>
  <body >
  <script>doClock();</script>
     <form name=serviceform method=get action="/Genius/form/general/CallPerformed.jsp?status=m">
  <%
  
  
  
  // callentry_id=11$12&compalint_id=1GI532012&emp_id=3034&cust_id=179&item_name=TALLY%202250%20,<br>IBM
  String cust_id= request.getParameter("cust_id")!=null?request.getParameter("cust_id"):"-";
  String callentryno= request.getParameter("callentry_id")!=null?request.getParameter("callentry_id"):"";
  String complaint_id= request.getParameter("complaint_id")!=null?request.getParameter("complaint_id"):"";
  String emp_eid= request.getParameter("emp_id")!=null?request.getParameter("emp_id"):"";
  String item_name= request.getParameter("item_name")!=null?request.getParameter("item_name"):"";
  String items="",customer_name="-",call_lock_date="-",call_lock_time="-",call_details="-",employee_name="-";
out.println(callentryno+"---"+emp_id+"---"+item_name+"---"+complaint_id);
try
{  if(complaint_id!=("") && emp_eid!=(""))
  { // out.println(callentryno+"---"+emp_id+"---"+item_name+"---"+complaint_id);
  ResultSet rs1=null;
CallableStatement cstmt = con.prepareCall("{?=call fun_sendtoCallEntry(?,?)}");
			cstmt.registerOutParameter(1, Types.INTEGER);
			cstmt.setString(2, complaint_id);
			cstmt.setInt(3,Integer.parseInt(cust_id));
			
			
			cstmt.execute();
			
			int removed_status =(cstmt.getInt(1));
  }
response.sendRedirect("/Genius/form/general/CallPerformed.jsp?status=m");
   }
   
   catch(Exception e){} %>
    </table>

   </form> 
   
   
  </body>
</html>
